//
//  HTGoodsRecordsViewController.m
//  TruckDriver
//
//  Created by Ting Han on 2017/9/27.
//  Copyright © 2017年 Ting Han. All rights reserved.
//

#import "HTGoodsRecordsViewController.h"
#import "HTGoodsRecordCell.h"

@interface HTGoodsRecordsViewController ()<UITableViewDelegate,UITableViewDataSource>

@property (weak, nonatomic) IBOutlet UITableView *tableView;
@property (nonatomic,strong) NSMutableArray *dataSource;

@end

@implementation HTGoodsRecordsViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    [self configTableView];
}
- (void)configTableView{
    self.title = @"找货记录";
    self.tableView.delegate = self;
    self.tableView.dataSource = self;
    [self.tableView registerNib:[UINib nibWithNibName:NSStringFromClass([HTGoodsRecordCell class]) bundle:nil] forCellReuseIdentifier:goodsRecordCell];
   
    self.dataSource = @[@"",@"",@"",@"",@""].mutableCopy;
    
}
- (NSMutableArray *)dataSource{
    if (!_dataSource) {
        _dataSource = [NSMutableArray array];
    }
    return _dataSource;
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

#pragma mark --- tableView
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView{
    return 1;
}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
    return self.dataSource.count;
}
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
    return 225;
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
    HTGoodsRecordCell *cell = [tableView dequeueReusableCellWithIdentifier:goodsRecordCell forIndexPath:indexPath];
    cell.backgroundColor = [UIColor grayColor];
    return cell;
}
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
   
}

@end
